package cn.wsalix.type;

public enum PushTypeEnum {
	jpush("0", "极光推送"),baidu("1", "百度推送"),tx("2", "腾讯推送");
	private String code;
	private String title;

	PushTypeEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static PushTypeEnum findByCode(String code) {
		for (PushTypeEnum userKind : PushTypeEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
